<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Demos</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="../default.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	background-color: #13220B;
}
-->
</style>
<link href="../smart_ide.css" rel="stylesheet" type="text/css" />
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var myloc = window.location.href;
var locarray = myloc.split("/");
delete locarray[(locarray.length-1)];
var arraytext = locarray.join("/");
//  End -->
</script>
</head>
<body>
<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
	<tr>
		<td class="text1" style="height: 50px;">the smart ide </td>
	</tr>
	
	<tr>
		<td class="bg5"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="height: 62px; padding-top: 15px;">
			<tr align="center">
				<td width="15%"><a href="../index.html" class="link1">homepage</a></td>
				<td width="19%"><a href="../about.html" class="link1">about smart ide </a></td>
				<td width="19%"><a href="../documents.html" class="link1">Documents</a></td>
				<td width="15%"><a href="../demos.html" class="link1">DEMOS</a></td>
				<td width="14%"><a href="../download.html" class="link1">download</a></td>
				<td width="18%"><a href="../sitemap.html" class="link1">sitemap </a></td>
			</tr>
		</table></td>
	</tr>
	<tr>
		<td valign="top" class="bg6">&nbsp;</td>
	</tr>
	<tr>
		<td><table width="780" border="0" cellspacing="0" cellpadding="0">
				<tr valign="top">
					<td width="20">&nbsp;</td>
					<td width="197"><table width="95%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td><img src="../images/spacer.gif" alt="" width="30" height="30" /></td>
							</tr>
							<tr>
								<td class="text2">news and updates </td>
							</tr>
							<tr>
								<td class="text3">&nbsp;</td>
							</tr>
							<tr>
								<td class="bg3"><img src="../images/spacer.gif" alt="" width="100" height="1" /></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td><p class="text4">[ 2010.02.09 ] Reworking the structure to Knit2 </p>
									<p><img src="../images/work.jpg" alt="" width="80" height="80" class="img1" />Adapted from the previous Knit structure, we are reworking the whole system to setup Knit2. The main goal is to come up with a language that supports markup, website update, version control, test engine and in-line text to executable code. </p>
									<p><a href="../updates.html">Read Full Article</a> </p></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="bg3"><img src="../images/spacer.gif" alt="" width="100" height="1" /></td>
							</tr>
							<tr>
								<td><img src="../images/spacer.gif" alt="" width="30" height="30" /></td>
							</tr>
							<tr>
								<td><p class="text4">[ 2010.13.10 ] Revising the Design Proposal Document </p>
									<p><img src="../images/doc.jpg" alt="" width="80" height="80" class="img1" />A lot has changed since the last draft of the design proposal document was submitted. The new structure and specifications among other things are being included in this new document. </p>
									<p align="left"><a href="../updates.html">Read Full Article</a> </p>
									<img src="../images/spacer.gif" alt="" width="100" height="1" /></td>
							</tr>
							<tr>
								<td><img src="../images/spacer.gif" alt="" width="100" height="1" />
							    <p><a href="../updates.html">Previous Updates </a></p></td>
							</tr>
				  </table></td>
					<td width="16">&nbsp;</td>
					<td width="527"><table width="527" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td width="413"><p><img src="../images/spacer.gif" alt="" width="30" height="30" /></p>
							    <p><div id="cse" style="width: 30">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  google.load('search', '1', {language : 'en', style : google.loader.themes.GREENSKY});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('014731735900021811640:a81ztml3jfu');
    customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
    customSearchControl.draw('cse');
  }, true);
</script>


      &nbsp;</p></td>
							</tr>
							<tr>
								<td><img src="../images/img6.jpg" alt="" width="413" height="24" /></td>
							</tr>
							<tr>
								<td class="bg2"><table width="459" border="0" align="center" cellpadding="0" cellspacing="0">
										<tr>
											<td class="text2">Demos</td>
										</tr>
										<tr>
											<td class="text3">&nbsp;</td>
										</tr>
										<tr>
											<td class="bg3"><img src="../images/spacer.gif" alt="" width="100" height="1" /></td>
										</tr>
										<tr>
											<td><p>&nbsp;</p>
										   <center>
<div align="left">
 <pre style='color:#000000;background:#ffffff;'><span style='color:#696969; '>/*
@author Zach Cowell - zcowell</span><span style='color:#696969; '>&#xa0;
Program: Replacement.java
</span><span style='color:#696969; '>*/</span>

<span style='color:#800000; font-weight:bold; '>import</span> java<span style='color:#808030; '>.</span>util<span style='color:#808030; '>.</span><span style='color:#808030; '>*</span><span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>import</span> java<span style='color:#808030; '>.</span>io<span style='color:#808030; '>.</span>PrintWriter<span style='color:#800080; '>;</span>
<span style='color:#800000; font-weight:bold; '>import</span> java<span style='color:#808030; '>.</span>io<span style='color:#808030; '>.</span>FileReader<span style='color:#800080; '>;</span>

public class Palindrome<span style='color:#800080; '>{</span>
<span style='color:#808030; '>&lt;</span><span style='color:#808030; '>/</span>p<span style='color:#808030; '>></span>
<span style='color:#808030; '>&lt;</span>pre<span style='color:#808030; '>></span>
  public <span style='color:#800000; font-weight:bold; '>static</span> <span style='color:#800000; font-weight:bold; '>void</span> <span style='color:#400000; '>main</span><span style='color:#808030; '>(</span><span style='color:#603000; '>String</span> args<span style='color:#808030; '>[</span><span style='color:#808030; '>]</span><span style='color:#808030; '>)</span> throws Exception<span style='color:#800080; '>{</span>
    
    Scanner in <span style='color:#808030; '>=</span> new Scanner<span style='color:#808030; '>(</span>System<span style='color:#808030; '>.</span>in<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    System<span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>Enter the name of the file to use: </span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#603000; '>String</span> pally <span style='color:#808030; '>=</span> in<span style='color:#808030; '>.</span>nextLine<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    ArrayList<span style='color:#808030; '>&lt;</span><span style='color:#603000; '>String</span><span style='color:#808030; '>></span> list <span style='color:#808030; '>=</span> new ArrayList<span style='color:#808030; '>&lt;</span><span style='color:#603000; '>String</span><span style='color:#808030; '>></span><span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
  
    pally <span style='color:#808030; '>=</span> pally<span style='color:#808030; '>.</span>trim<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    pally <span style='color:#808030; '>=</span> pally<span style='color:#808030; '>.</span>toLowerCase<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    pally <span style='color:#808030; '>=</span> pall<span style='color:#808030; '>.</span>superTrim<span style='color:#800080; '>;</span>
    
    
    
    <span style='color:#800000; font-weight:bold; '>while</span><span style='color:#808030; '>(</span>scr<span style='color:#808030; '>.</span>hasNextLine<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span><span style='color:#800080; '>{</span>
      <span style='color:#603000; '>String</span> str <span style='color:#808030; '>=</span> scr<span style='color:#808030; '>.</span>nextLine<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
      list<span style='color:#808030; '>.</span>add<span style='color:#808030; '>(</span>str<span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
    <span style='color:#800080; '>}</span><span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>int</span> i <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> i <span style='color:#808030; '>&lt;</span> list<span style='color:#808030; '>.</span>length<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> i<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span>
     <span style='color:#800080; '>{</span>
       <span style='color:#800000; font-weight:bold; '>if</span> <span style='color:#808030; '>(</span>list<span style='color:#808030; '>.</span>get<span style='color:#808030; '>(</span>i<span style='color:#808030; '>)</span><span style='color:#808030; '>.</span>equals<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>{</span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span>
        list<span style='color:#808030; '>.</span>replace<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>{</span><span style='color:#800000; '>"</span><span style='color:#808030; '>,</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>BEGIN</span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
       <span style='color:#800000; font-weight:bold; '>else</span> <span style='color:#800000; font-weight:bold; '>if</span> <span style='color:#808030; '>(</span>list<span style='color:#808030; '>.</span>get<span style='color:#808030; '>(</span>i<span style='color:#808030; '>)</span><span style='color:#808030; '>.</span>equals<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>}</span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#808030; '>)</span>
        list<span style='color:#808030; '>.</span>replace<span style='color:#808030; '>(</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>}</span><span style='color:#800000; '>"</span><span style='color:#808030; '>,</span><span style='color:#800000; '>"</span><span style='color:#0000e6; '>END</span><span style='color:#800000; '>"</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span>
     <span style='color:#800080; '>}</span>
  
  
   <span style='color:#800000; font-weight:bold; '>for</span><span style='color:#808030; '>(</span><span style='color:#800000; font-weight:bold; '>int</span> i <span style='color:#808030; '>=</span> <span style='color:#008c00; '>0</span><span style='color:#800080; '>;</span> i <span style='color:#808030; '>&lt;</span> list<span style='color:#808030; '>.</span>size<span style='color:#808030; '>(</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span> i<span style='color:#808030; '>+</span><span style='color:#808030; '>+</span><span style='color:#808030; '>)</span>
     System<span style='color:#808030; '>.</span>out<span style='color:#808030; '>.</span>println<span style='color:#808030; '>(</span>list<span style='color:#808030; '>.</span>get<span style='color:#808030; '>(</span>i<span style='color:#808030; '>)</span><span style='color:#808030; '>)</span><span style='color:#800080; '>;</span></pre> 
  
</div>
										   </center>
<p></td>
								  </tr>
										<tr>
											<td width="409"><p>Subscribe to RSS </p>
										  </td>
										</tr>
									</table></td>
							</tr>
							<tr>
								<td><img src="../images/img8.jpg" alt="" width="413" height="16" /></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
				  </table></td>
					<td width="20">&nbsp;</td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td class="bg4"><h3 class="text5">Copyright © 2006 smartide.com. Designed by <a href="">Group 6 </a></h3></td>
	</tr>
</table>
<div style="text-align: center; font-size: 0.75em;">  </div></body>
</html>
